<?php

class Session
{

	private $prefix;

	public function __construct($prefix = null){

		$this->prefix = $prefix;

	}
	public function __set($var, $val){

		$key = $this->prefix.$var;

		$_SESSION[$key] = $val;
	
	}

	public function __get($var){
	
		$key = $this->prefix.$var;

		return (isset($_SESSION[$key])) ? $_SESSION[$key] : false;

	}

	public function sessionSet($var){
		$key = $this->prefix.$var;

		return (isset($_SESSION[$key])) ? true : false;

	}

	public function kill($var){
	
		$key = $this->prefix.$var;

		if(isset($_SESSION[$key]) && is_array($_SESSION[$key]))
		{
			$_SESSION[$key] = array();
		}

		unset($_SESSION[$key]);

	}

}

?>